package com.jerome.fs.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * date util
 * @author Jerome
 * @date 2023/9/9
 */
public class DateUtil {
    static SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    /**
     * Parses text from the beginning of the given string to produce a date.
     * The method may not use the entire text of the given string.
     * @param dateStr  date text
     * @author Jerome
     * @date 2023/9/9 17:52
     */
    public static Date parseDate(String dateStr) throws ParseException {
        return sdf.parse(dateStr);
    }
}
